# 文件复制
import os.path


def copy(src, target):
    if os.path.isdir(src):
        file = os.listdir(src)
        print(file)
        for i in file:
            path = os.path.join(src, i)
            if os.path.isdir(path):
                p2 = os.path.join(target, i)
                if not os.path.exists(p2):
                    os.mkdir(p2)
                copy(path, p2)
            else:
                with open(path, 'rb') as rstream:
                    target_path = os.path.join(target, i)
                    with open(target_path, 'wb') as wstream:
                        wstream.write(rstream.read())
        else:
            print("复制完毕！")

        try:
            pass
        except:
            pass
        finally:
            pass



src_path = r'E:\opt\p1'
target_path = r'E:\opt\p2'

copy(src_path, target_path)

print(806 - 124)
print(682 / 3)